package io.dracula.test.spring.presentation.boot;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author dk
 */
@Component
public class ScheduledLoggingBean {

    private static final Logger logger = LoggerFactory.getLogger(ScheduledLoggingBean.class);

    @Scheduled(cron = "*/3 * * * * ?")
    public void test(){
        logger.error("level error");
        logger.warn("level warn");
        logger.info("level info");
        logger.debug("level debug");
        logger.trace("level trace");
    }

}
